public class Test {
    public static void main1(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);
        System.out.println("======查找关键字======");
        System.out.println(myLinkedList.contain(2));
        System.out.println(myLinkedList.size());
        myLinkedList.display();
    }


    public static void main2(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);
        myLinkedList.addLast(5);
        myLinkedList.addLast(6);
        myLinkedList.addLast(7);
        myLinkedList.display();
        System.out.println("========删除关键字=======");
        myLinkedList.remove(1);
        myLinkedList.remove(3);
        myLinkedList.remove(7);
        myLinkedList.display();
    }


    public static void main(String[] args) {
        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addLast(1);
        myLinkedList.addLast(2);
        myLinkedList.addLast(3);
        myLinkedList.addLast(4);
        myLinkedList.addLast(5);
        myLinkedList.display();
        System.out.println("=======插入元素=======");
        myLinkedList.addIndex(5,99);
        myLinkedList.display();
        System.out.println("=======清空链表======");
        myLinkedList.clear();
        myLinkedList.display();
    }




}
